<?php

namespace DesignNew\AbstractFactory;

require('../vendor/autoload.php');
/**
 * 如何使用
 */
class AfClient{

    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
        $woodenFactory = new WoodenDoorFactory();
        $door = $woodenFactory->makeDoor();
        $expert = $woodenFactory->makeFittingExpert();

        $door->getDescription();
        $expert->getDescription();

        $ironFactory = new \DesignNew\AbstractFactory\IronDoorFactory();
        $door = $ironFactory->makeDoor();
        $expert = $ironFactory->makeFittingExpert();

        $door->getDescription();
        $expert->getDescription();
    }
}

$client = new AfClient();